/*
 * @(#)Evolution.java   09/09/13
 * 
 * Copyright (C) 2009 Ecole des Mines d'Ales
 *
 * This library itfP free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library itfP distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Contact: yulinz88@gmail.com
 *
 *
 *
 */



package fr.ema.arch3d.editor;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 * Class description
 *
 *
 * @version        1.0, 09/09/13
 * @author         Huaxi (Yulin) ZHANG    
 */
public class Evolution extends JFrame {

    /** Field description */
    private static final long serialVersionUID = 1L;

    /** Field description */
    private JButton assEvolution_jButton = null;

    /** Field description */
    private JLabel assNew_jLabel = null;

    /** Field description */
    private JTextField assNew_jTextField = null;

    /** Field description */
    private JLabel assOld_jLabel = null;

    /** Field description */
    private JTextField assOld_jTextField = null;

    /** Field description */
    private JComboBox ass_jComboBox = null;

    /** Field description */
    private JLabel ass_jLabel = null;

    /** Field description */
    private JPanel ass_jPanel = null;

    /** Field description */
    private JTextArea assadl_jTextArea = null;

    /** Field description */
    private JLabel assald_jLabel = null;

    /** Field description */
    private JButton begin_jButton = null;

    /** Field description */
    private JLabel cmpNewName_jLabel = null;

    /** Field description */
    private JTextField cmpNewName_jTextField = null;

    /** Field description */
    private JLabel cmpOldName_jLabel = null;

    /** Field description */
    private JTextField cmpOldName_jTextField = null;

    /** Field description */
    private JComboBox config_jComboBox = null;

    /** Field description */
    private JLabel config_jLabel = null;

    /** Field description */
    private JPanel config_jPanel = null;

    /** Field description */
    private JLabel configadl_jLabel = null;

    /** Field description */
    private JTextArea configadl_jTextArea = null;

    /** Field description */
    private JLabel epa_jLabel = null;

    /** Field description */
    private JPanel jContentPane = null;

    /** Field description */
    private JPanel jPanelAss = null;    // @jve:decl-index=0:visual-constraint="118,350"

    /** Field description */
    private JSplitPane jSplitPane = null;

    /** Field description */
    private JTabbedPane jTabbedPane = null;

    /** Field description */
    private JLabel r1_jLabel = null;

    /** Field description */
    private JLabel r1o_jLabel = null;

    /** Field description */
    private JLabel r2_jLabel = null;

    /** Field description */
    private JLabel r2o_jLabel = null;

    /** Field description */
    private JLabel r3_jLabel = null;

    /** Field description */
    private JLabel r3o_jLabel = null;

    /** Field description */
    private JLabel r4_jLabel = null;

    /** Field description */
    private JLabel r4o_jLabel = null;

    /** Field description */
    private JLabel r5_jLabel = null;

    /** Field description */
    private JLabel r5o_jLabel = null;

    /** Field description */
    private JLabel r6_jLabel = null;

    /** Field description */
    private JLabel r6o_jLabel = null;

    /** Field description */
    private JLabel re_jLabel = null;

    /** Field description */
    private JLabel s1_jLabel = null;

    /** Field description */
    private JLabel s1o_jLabel = null;

    /** Field description */
    private JLabel s2_jLabel = null;

    /** Field description */
    private JLabel s2o_jLabel = null;

    /** Field description */
    private JLabel s3_jLabel = null;

    /** Field description */
    private JLabel s3o_jLabel = null;

    /** Field description */
    private JLabel s4_jLabel = null;

    /** Field description */
    private JLabel s4o_jLabel = null;

    /** Field description */
    private JLabel s5_jLabel = null;

    /** Field description */
    private JLabel s5o_jLabel = null;

    /** Field description */
    private JLabel s6_jLabel = null;

    /** Field description */
    private JLabel s6o_jLabel = null;

    /** Field description */
    private JLabel space1_jLabel = null;

    /** Field description */
    private JLabel space2_jLabel = null;

    /** Field description */
    private JLabel space3_jLabel = null;

    /** Field description */
    private JLabel space4_jLabel = null;

    /** Field description */
    private JButton specEvolution_jButton = null;

    /** Field description */
    private JLabel specNew_jLabel = null;

    /** Field description */
    private JTextField specNew_jTextField = null;

    /** Field description */
    private JLabel specOld_jLabel = null;

    /** Field description */
    private JTextField specOld_jTextField = null;

    /** Field description */
    private JComboBox spec_jComboBox = null;

    /** Field description */
    private JLabel spec_jLabel = null;

    /** Field description */
    private JPanel spec_jPanel = null;

    /** Field description */
    private JLabel specadl_jLabel = null;

    /** Field description */
    private JTextArea specadl_jTextArea = null;

    /** Field description */
    private JLabel test_jLabel = null;

    /**
     * This itfP the default constructor
     */
    public Evolution() {
        super();
        initialize();
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    /**
     * This itfP the default constructor
     *
     * @param level
     * @param type
     * @param cmpName
     */
    public Evolution(String level, String type, String cmpName) {
        super();
        initialize();

        if (level.equals("spec")) {
            jTabbedPane.setSelectedIndex(0);

            if (type.equals("add")) {
                spec_jComboBox.setSelectedIndex(0);
            } else if (type.equals("delete")) {
                spec_jComboBox.setSelectedIndex(1);
            } else if (type.equals("replace")) {
                spec_jComboBox.setSelectedIndex(2);
            }
        } else if (level.equals("config")) {
            jTabbedPane.setSelectedIndex(1);

            if (type.equals("add")) {
                config_jComboBox.setSelectedIndex(0);
            } else if (type.equals("delete")) {
                config_jComboBox.setSelectedIndex(1);
            } else if (type.equals("replace")) {
                config_jComboBox.setSelectedIndex(2);
            }
        } else if (level.equals("ass")) {
            jTabbedPane.setSelectedIndex(2);

            if (type.equals("add")) {
                ass_jComboBox.setSelectedIndex(0);
            } else if (type.equals("delete")) {
                ass_jComboBox.setSelectedIndex(1);
            } else if (type.equals("replace")) {
                ass_jComboBox.setSelectedIndex(2);
            }
        }

        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    /**
     * This method initializes this
     *
     * @return void
     */
    private void initialize() {
        this.setSize(720, 480);
        this.setContentPane(getJContentPane());
        this.setTitle("Evolution");
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jContentPane = new JPanel();
            jContentPane.setLayout(new BorderLayout());
            jContentPane.add(getJSplitPane(), BorderLayout.CENTER);
        }

        return jContentPane;
    }

    /**
     * This method initializes jSplitPane
     *
     * @return javax.swing.JSplitPane
     */
    private JSplitPane getJSplitPane() {
        if (jSplitPane == null) {
            jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
            jSplitPane.setDividerLocation(200);
            jSplitPane.setTopComponent(getJTabbedPane());
            jSplitPane.setBottomComponent(getJPanelAss());
        }

        return jSplitPane;
    }

    /**
     * This method initializes jTabbedPane
     *
     * @return javax.swing.JTabbedPane
     */
    private JTabbedPane getJTabbedPane() {
        if (jTabbedPane == null) {
            jTabbedPane = new JTabbedPane();
            jTabbedPane.addTab("AbstractSpecification", null, getSpec_jPanel(), null);
            jTabbedPane.addTab("AbstractConfiguration", null, getConfig_jPanel(), null);
            jTabbedPane.addTab("Assembly", null, getAss_jPanel(), null);
        }

        return jTabbedPane;
    }

    /**
     * This method initializes spec_jPanel
     *
     * @return javax.swing.JPanel
     */
    private JPanel getSpec_jPanel() {
        if (spec_jPanel == null) {
            GridBagConstraints gridBagConstraints54 = new GridBagConstraints();

            gridBagConstraints54.gridx = 4;
            gridBagConstraints54.gridy = 3;
            gridBagConstraints54.fill  = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints47 = new GridBagConstraints();

            gridBagConstraints47.fill    = GridBagConstraints.VERTICAL;
            gridBagConstraints47.gridy   = 0;
            gridBagConstraints47.weightx = 1.0;
            gridBagConstraints47.gridx   = 4;
            gridBagConstraints47.fill    = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints46 = new GridBagConstraints();

            gridBagConstraints46.gridx = 3;
            gridBagConstraints46.gridy = 0;
            gridBagConstraints46.fill  = GridBagConstraints.BOTH;
            specOld_jLabel             = new JLabel();
            specOld_jLabel.setText("Old cpmponentType:");
            specOld_jLabel.setVisible(false);

            GridBagConstraints gridBagConstraints45 = new GridBagConstraints();

            gridBagConstraints45.fill    = GridBagConstraints.VERTICAL;
            gridBagConstraints45.gridy   = 0;
            gridBagConstraints45.weightx = 1.0;
            gridBagConstraints45.gridx   = 2;
            gridBagConstraints45.fill    = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints8 = new GridBagConstraints();

            gridBagConstraints8.gridx = 1;
            gridBagConstraints8.gridy = 0;
            gridBagConstraints8.fill  = GridBagConstraints.BOTH;
            specNew_jLabel            = new JLabel();
            specNew_jLabel.setText("New componentType:");

            GridBagConstraints gridBagConstraints4 = new GridBagConstraints();

            gridBagConstraints4.gridx  = 0;
            gridBagConstraints4.gridy  = 1;
            gridBagConstraints4.anchor = GridBagConstraints.WEST;
            specadl_jLabel             = new JLabel();
            specadl_jLabel.setText("Added componentType ADL description");

            GridBagConstraints gridBagConstraints3 = new GridBagConstraints();

            gridBagConstraints3.fill  = GridBagConstraints.BOTH;
            gridBagConstraints3.gridy = 2;

            // gridBagConstraints3.weightx = 1.0;
            gridBagConstraints3.weighty   = 1.0;
            gridBagConstraints3.gridx     = 0;
            gridBagConstraints3.gridwidth = 5;

            GridBagConstraints gridBagConstraints21 = new GridBagConstraints();

            gridBagConstraints21.fill  = GridBagConstraints.VERTICAL;
            gridBagConstraints21.gridy = 0;

            // gridBagConstraints21.weightx = 1.0;
            gridBagConstraints21.gridx  = 0;
            gridBagConstraints21.anchor = GridBagConstraints.WEST;

            GridBagConstraints GridBagConstraints = new GridBagConstraints();

            spec_jPanel = new JPanel();
            spec_jPanel.setLayout(new GridBagLayout());
            spec_jPanel.add(getSpec_jComboBox(), gridBagConstraints21);
            spec_jPanel.add(getspecAdl_jTextArea(), gridBagConstraints3);
            spec_jPanel.add(specadl_jLabel, gridBagConstraints4);
            spec_jPanel.add(specNew_jLabel, gridBagConstraints8);
            spec_jPanel.add(getSpecNew_jTextField(), gridBagConstraints45);
            spec_jPanel.add(specOld_jLabel, gridBagConstraints46);
            spec_jPanel.add(getSpecOld_jTextField(), gridBagConstraints47);
            spec_jPanel.add(getSpecEvolution_jButton(), gridBagConstraints54);
        }

        return spec_jPanel;
    }

    /**
     * This method initializes config_jPanel
     *
     * @return javax.swing.JPanel
     */
    private JPanel getConfig_jPanel() {
        if (config_jPanel == null) {
            GridBagConstraints gridBagConstraints51 = new GridBagConstraints();

            gridBagConstraints51.gridy = 0;

            // gridBagConstraints51.weightx =0.3;
            gridBagConstraints51.gridx = 4;
            gridBagConstraints51.fill  = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints44 = new GridBagConstraints();

            gridBagConstraints44.gridx = 1;
            gridBagConstraints44.gridy = 0;

            // gridBagConstraints44.weightx = 1.0;
            gridBagConstraints44.fill = GridBagConstraints.BOTH;
            cmpNewName_jLabel         = new JLabel();
            cmpNewName_jLabel.setText("New componentClass:");

            GridBagConstraints gridBagConstraints310 = new GridBagConstraints();

            gridBagConstraints310.gridy     = 0;
            gridBagConstraints310.weightx   = 1.0;
            gridBagConstraints310.gridx     = 2;
            gridBagConstraints310.gridwidth = 1;
            gridBagConstraints310.fill      = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints210 = new GridBagConstraints();

            gridBagConstraints210.gridx = 3;
            gridBagConstraints210.gridy = 0;
            cmpOldName_jLabel           = new JLabel();
            cmpOldName_jLabel.setText("Old componentClass:");
            cmpOldName_jLabel.setVisible(false);

            GridBagConstraints gridBagConstraints110 = new GridBagConstraints();

            gridBagConstraints110.gridx = 4;
            gridBagConstraints110.gridy = 3;

            GridBagConstraints gridBagConstraints5 = new GridBagConstraints();

            gridBagConstraints5.fill  = GridBagConstraints.BOTH;
            gridBagConstraints5.gridy = 2;

            // gridBagConstraints5.weightx = 1.0;
            gridBagConstraints5.weighty   = 1.0;
            gridBagConstraints5.gridwidth = 5;
            gridBagConstraints5.gridx     = 0;

            GridBagConstraints gridBagConstraints = new GridBagConstraints();

            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;

            // gridBagConstraints.gridwidth =3;
            gridBagConstraints.anchor = GridBagConstraints.WEST;
            configadl_jLabel          = new JLabel();
            configadl_jLabel.setText("Added componentClass ADL description");

            GridBagConstraints gridBagConstraints1 = new GridBagConstraints();

            gridBagConstraints1.fill  = GridBagConstraints.VERTICAL;
            gridBagConstraints1.gridy = 0;

            // gridBagConstraints1.weightx = 1.0;
            gridBagConstraints1.gridx  = 0;
            gridBagConstraints1.anchor = GridBagConstraints.WEST;
            config_jPanel              = new JPanel();
            config_jPanel.setLayout(new GridBagLayout());
            config_jPanel.add(getConfig_jComboBox(), gridBagConstraints1);
            config_jPanel.add(configadl_jLabel, gridBagConstraints);
            config_jPanel.add(getConfigadl_jTextArea(), gridBagConstraints5);
            config_jPanel.add(getBegin_jButton(), gridBagConstraints110);
            config_jPanel.add(cmpOldName_jLabel, gridBagConstraints210);
            config_jPanel.add(getCmpOldName_jTextField(), gridBagConstraints51);
            config_jPanel.add(cmpNewName_jLabel, gridBagConstraints44);
            config_jPanel.add(getCmpNewName_jTextField(), gridBagConstraints310);
        }

        return config_jPanel;
    }

    /**
     * This method initializes ass_jPanel
     *
     * @return javax.swing.JPanel
     */
    private JPanel getAss_jPanel() {
        if (ass_jPanel == null) {
            GridBagConstraints gridBagConstraints53 = new GridBagConstraints();

            gridBagConstraints53.gridx = 4;
            gridBagConstraints53.gridy = 3;
            gridBagConstraints53.fill  = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints52 = new GridBagConstraints();

            gridBagConstraints52.fill    = GridBagConstraints.VERTICAL;
            gridBagConstraints52.gridy   = 0;
            gridBagConstraints52.weightx = 1.0;
            gridBagConstraints52.gridx   = 4;
            gridBagConstraints52.fill    = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints50 = new GridBagConstraints();

            gridBagConstraints50.gridx = 3;
            gridBagConstraints50.gridy = 0;
            gridBagConstraints50.fill  = GridBagConstraints.BOTH;
            assOld_jLabel              = new JLabel();
            assOld_jLabel.setText("Old componentInstance:");

            GridBagConstraints gridBagConstraints49 = new GridBagConstraints();

            gridBagConstraints49.fill    = GridBagConstraints.VERTICAL;
            gridBagConstraints49.gridy   = 0;
            gridBagConstraints49.weightx = 1.0;
            gridBagConstraints49.gridx   = 2;
            gridBagConstraints49.fill    = GridBagConstraints.BOTH;

            GridBagConstraints gridBagConstraints48 = new GridBagConstraints();

            gridBagConstraints48.gridx = 1;
            gridBagConstraints48.gridy = 0;
            gridBagConstraints48.fill  = GridBagConstraints.BOTH;
            assNew_jLabel              = new JLabel();
            assNew_jLabel.setText("New componentInstance:");

            GridBagConstraints gridBagConstraints7 = new GridBagConstraints();

            gridBagConstraints7.fill      = GridBagConstraints.BOTH;
            gridBagConstraints7.gridy     = 2;
            gridBagConstraints7.weightx   = 1.0;
            gridBagConstraints7.weighty   = 1.0;
            gridBagConstraints7.gridx     = 0;
            gridBagConstraints7.gridwidth = 5;

            GridBagConstraints gridBagConstraints6 = new GridBagConstraints();

            gridBagConstraints6.gridx  = 0;
            gridBagConstraints6.gridy  = 1;
            gridBagConstraints6.fill   = GridBagConstraints.BOTH;
            gridBagConstraints6.anchor = GridBagConstraints.WEST;
            assald_jLabel              = new JLabel();
            assald_jLabel.setText("Added componentInstance ADL description");

            GridBagConstraints gridBagConstraints2 = new GridBagConstraints();

            gridBagConstraints2.fill  = GridBagConstraints.VERTICAL;
            gridBagConstraints2.gridy = 0;

            // gridBagConstraints2.weightx = 1.0;
            gridBagConstraints2.gridx  = 0;
            gridBagConstraints2.anchor = GridBagConstraints.WEST;
            ass_jPanel                 = new JPanel();
            ass_jPanel.setLayout(new GridBagLayout());
            ass_jPanel.add(getAss_jComboBox(), gridBagConstraints2);
            ass_jPanel.add(assald_jLabel, gridBagConstraints6);
            ass_jPanel.add(getAssadl_jTextArea(), gridBagConstraints7);
            ass_jPanel.add(assNew_jLabel, gridBagConstraints48);
            ass_jPanel.add(getAssNew_jTextField(), gridBagConstraints49);
            ass_jPanel.add(assOld_jLabel, gridBagConstraints50);
            ass_jPanel.add(getAssOld_jTextField(), gridBagConstraints52);
            ass_jPanel.add(getAssEvolution_jButton(), gridBagConstraints53);
        }

        return ass_jPanel;
    }

    /**
     * This method initializes specadl_jTextArea
     *
     * @return javax.swing.JTextArea
     */
    private JTextArea getspecAdl_jTextArea() {
        if (specadl_jTextArea == null) {
            specadl_jTextArea = new JTextArea();
        }

        return specadl_jTextArea;
    }

    /**
     * This method initializes configadl_jTextArea
     *
     * @return javax.swing.JTextArea
     */
    private JTextArea getConfigadl_jTextArea() {
        if (configadl_jTextArea == null) {
            configadl_jTextArea = new JTextArea();
        }

        return configadl_jTextArea;
    }

    /**
     * This method initializes assadl_jTextArea
     *
     * @return javax.swing.JTextArea
     */
    private JTextArea getAssadl_jTextArea() {
        if (assadl_jTextArea == null) {
            assadl_jTextArea = new JTextArea();
        }

        return assadl_jTextArea;
    }

    /**
     * This method initializes jPanelAss
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJPanelAss() {
        if (jPanelAss == null) {
            GridBagConstraints gridBagConstraints43 = new GridBagConstraints();

            gridBagConstraints43.gridx = 1;
            gridBagConstraints43.gridy = 4;
            space4_jLabel              = new JLabel();
            space4_jLabel.setText("     ");

            GridBagConstraints gridBagConstraints42 = new GridBagConstraints();

            gridBagConstraints42.gridx = 7;
            gridBagConstraints42.gridy = 4;
            space3_jLabel              = new JLabel();
            space3_jLabel.setText("   ");

            GridBagConstraints gridBagConstraints41 = new GridBagConstraints();

            gridBagConstraints41.gridx = 3;
            gridBagConstraints41.gridy = 4;
            space2_jLabel              = new JLabel();
            space2_jLabel.setText("  ");

            GridBagConstraints gridBagConstraints40 = new GridBagConstraints();

            gridBagConstraints40.gridx = 5;
            gridBagConstraints40.gridy = 7;
            space1_jLabel              = new JLabel();
            space1_jLabel.setText("      ");

            GridBagConstraints gridBagConstraints39 = new GridBagConstraints();

            gridBagConstraints39.gridx = 8;
            gridBagConstraints39.gridy = 8;
            gridBagConstraints39.fill  = GridBagConstraints.BOTH;
            r6o_jLabel                 = new JLabel();
            r6o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints38 = new GridBagConstraints();

            gridBagConstraints38.gridx = 6;
            gridBagConstraints38.gridy = 8;
            gridBagConstraints38.fill  = GridBagConstraints.BOTH;
            r6_jLabel                  = new JLabel();
            r6_jLabel.setText("");

            GridBagConstraints gridBagConstraints37 = new GridBagConstraints();

            gridBagConstraints37.gridx = 4;
            gridBagConstraints37.gridy = 6;
            gridBagConstraints37.fill  = GridBagConstraints.BOTH;
            s6o_jLabel                 = new JLabel();
            s6o_jLabel.setText("");

            GridBagConstraints gridBagConstraints36 = new GridBagConstraints();

            gridBagConstraints36.gridx = 2;
            gridBagConstraints36.gridy = 6;
            gridBagConstraints36.fill  = GridBagConstraints.BOTH;
            s6_jLabel                  = new JLabel();
            s6_jLabel.setText("");

            GridBagConstraints gridBagConstraints35 = new GridBagConstraints();

            gridBagConstraints35.gridx      = 0;
            gridBagConstraints35.gridy      = 8;
            gridBagConstraints35.gridheight = 2;
            gridBagConstraints35.anchor     = GridBagConstraints.WEST;
            ass_jLabel                      = new JLabel();
            gridBagConstraints35.fill       = GridBagConstraints.BOTH;
            ass_jLabel.setOpaque(true);
            ass_jLabel.setBackground(Color.white);
            ass_jLabel.setText("Assembly level");

            GridBagConstraints gridBagConstraints34 = new GridBagConstraints();

            gridBagConstraints34.gridx      = 0;
            gridBagConstraints34.gridy      = 5;
            gridBagConstraints34.gridheight = 2;
            gridBagConstraints34.anchor     = GridBagConstraints.WEST;
            gridBagConstraints34.fill       = GridBagConstraints.VERTICAL;
            config_jLabel                   = new JLabel();
            config_jLabel.setText("AbstractConfiguration level");
            config_jLabel.setOpaque(true);
            config_jLabel.setBackground(Color.lightGray);

            GridBagConstraints gridBagConstraints33 = new GridBagConstraints();

            gridBagConstraints33.gridx      = 0;
            gridBagConstraints33.gridy      = 2;
            gridBagConstraints33.gridheight = 2;
            gridBagConstraints33.anchor     = GridBagConstraints.WEST;
            gridBagConstraints33.fill       = GridBagConstraints.VERTICAL;
            spec_jLabel                     = new JLabel();
            spec_jLabel.setText("AbstractSpecification level");
            spec_jLabel.setOpaque(true);
            spec_jLabel.setBackground(Color.white);

            GridBagConstraints gridBagConstraints32 = new GridBagConstraints();

            gridBagConstraints32.gridx = 8;
            gridBagConstraints32.gridy = 2;
            gridBagConstraints32.fill  = GridBagConstraints.BOTH;
            r5o_jLabel                 = new JLabel();
            r5o_jLabel.setText("");

            GridBagConstraints gridBagConstraints31 = new GridBagConstraints();

            gridBagConstraints31.gridx  = 6;
            gridBagConstraints31.gridy  = 2;
            gridBagConstraints31.anchor = GridBagConstraints.WEST;
            gridBagConstraints31.fill   = GridBagConstraints.BOTH;
            r5_jLabel                   = new JLabel();
            r5_jLabel.setText("Modify architecutre behaviors");

            GridBagConstraints gridBagConstraints30 = new GridBagConstraints();

            gridBagConstraints30.gridx = 8;
            gridBagConstraints30.gridy = 3;
            gridBagConstraints30.fill  = GridBagConstraints.BOTH;
            r4o_jLabel                 = new JLabel();
            r4o_jLabel.setText("");

            GridBagConstraints gridBagConstraints29 = new GridBagConstraints();

            gridBagConstraints29.gridx  = 6;
            gridBagConstraints29.gridy  = 3;
            gridBagConstraints29.anchor = GridBagConstraints.WEST;
            gridBagConstraints29.fill   = GridBagConstraints.BOTH;
            r4_jLabel                   = new JLabel();
            r4_jLabel.setText("Modify specification");

            GridBagConstraints gridBagConstraints28 = new GridBagConstraints();

            gridBagConstraints28.gridx = 8;
            gridBagConstraints28.gridy = 5;
            gridBagConstraints28.fill  = GridBagConstraints.BOTH;
            r3o_jLabel                 = new JLabel();
            r3o_jLabel.setText("");

            GridBagConstraints gridBagConstraints27 = new GridBagConstraints();

            gridBagConstraints27.gridx  = 6;
            gridBagConstraints27.gridy  = 5;
            gridBagConstraints27.anchor = GridBagConstraints.WEST;
            gridBagConstraints27.fill   = GridBagConstraints.BOTH;
            r3_jLabel                   = new JLabel();
            r3_jLabel.setText("Modify configuration");

            GridBagConstraints gridBagConstraints26 = new GridBagConstraints();

            gridBagConstraints26.gridx = 8;
            gridBagConstraints26.gridy = 6;
            gridBagConstraints26.fill  = GridBagConstraints.BOTH;
            r2o_jLabel                 = new JLabel();
            r2o_jLabel.setText("");

            GridBagConstraints gridBagConstraints25 = new GridBagConstraints();

            gridBagConstraints25.gridx = 6;
            gridBagConstraints25.gridy = 6;
            gridBagConstraints25.fill  = GridBagConstraints.BOTH;
            r2_jLabel                  = new JLabel();
            r2_jLabel.setText("Validate motivation in component description");

            GridBagConstraints gridBagConstraints24 = new GridBagConstraints();

            gridBagConstraints24.gridx = 8;
            gridBagConstraints24.gridy = 9;
            r1o_jLabel                 = new JLabel();
            r1o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints23 = new GridBagConstraints();

            gridBagConstraints23.gridx  = 6;
            gridBagConstraints23.gridy  = 9;
            gridBagConstraints23.fill   = GridBagConstraints.BOTH;
            r1_jLabel                   = new JLabel();
            gridBagConstraints23.anchor = GridBagConstraints.WEST;
            r1_jLabel.setText("Modify assembly");

            GridBagConstraints gridBagConstraints22 = new GridBagConstraints();

            gridBagConstraints22.gridx = 4;
            gridBagConstraints22.gridy = 9;
            s5o_jLabel                 = new JLabel();
            s5o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints20 = new GridBagConstraints();

            gridBagConstraints20.gridx  = 2;
            gridBagConstraints20.gridy  = 9;
            gridBagConstraints20.anchor = GridBagConstraints.WEST;
            gridBagConstraints20.fill   = GridBagConstraints.BOTH;
            s5_jLabel                   = new JLabel();
            s5_jLabel.setText("Test modified assembly");

            GridBagConstraints gridBagConstraints19 = new GridBagConstraints();

            gridBagConstraints19.gridx = 4;
            gridBagConstraints19.gridy = 8;
            s4o_jLabel                 = new JLabel();
            s4o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints18 = new GridBagConstraints();

            gridBagConstraints18.gridx = 4;
            gridBagConstraints18.gridy = 5;
            s3o_jLabel                 = new JLabel();
            s3o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints17 = new GridBagConstraints();

            gridBagConstraints17.gridx  = 2;
            gridBagConstraints17.gridy  = 8;
            gridBagConstraints17.anchor = GridBagConstraints.WEST;
            gridBagConstraints17.fill   = GridBagConstraints.BOTH;
            s4_jLabel                   = new JLabel();
            s4_jLabel.setText("Mutate component instance");

            GridBagConstraints gridBagConstraints16 = new GridBagConstraints();

            gridBagConstraints16.gridx  = 2;
            gridBagConstraints16.gridy  = 5;
            gridBagConstraints16.anchor = GridBagConstraints.WEST;
            gridBagConstraints16.fill   = GridBagConstraints.BOTH;
            s3_jLabel                   = new JLabel();
            s3_jLabel.setText("Collect evolution information");

            GridBagConstraints gridBagConstraints15 = new GridBagConstraints();

            gridBagConstraints15.gridx = 4;
            gridBagConstraints15.gridy = 3;
            s2o_jLabel                 = new JLabel();
            s2o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints14 = new GridBagConstraints();

            gridBagConstraints14.gridx  = 2;
            gridBagConstraints14.gridy  = 3;
            gridBagConstraints14.anchor = GridBagConstraints.WEST;
            gridBagConstraints14.fill   = GridBagConstraints.BOTH;
            s2_jLabel                   = new JLabel();
            s2_jLabel.setText("Verify evolution progagation scope");

            GridBagConstraints gridBagConstraints13 = new GridBagConstraints();

            gridBagConstraints13.gridx = 4;
            gridBagConstraints13.gridy = 2;
            s1o_jLabel                 = new JLabel();
            s1o_jLabel.setText("ok");

            GridBagConstraints gridBagConstraints12 = new GridBagConstraints();

            gridBagConstraints12.gridx  = 2;
            gridBagConstraints12.gridy  = 2;
            gridBagConstraints12.anchor = GridBagConstraints.WEST;
            gridBagConstraints12.fill   = GridBagConstraints.BOTH;
            s1_jLabel                   = new JLabel();
            s1_jLabel.setText("Verify specification correctness");

            GridBagConstraints gridBagConstraints11 = new GridBagConstraints();

            gridBagConstraints11.gridx = 6;
            gridBagConstraints11.gridy = 1;
            gridBagConstraints11.fill  = GridBagConstraints.BOTH;
            re_jLabel                  = new JLabel();
            re_jLabel.setText("Re-engineering stage");
            re_jLabel.setFont(new Font("Serif", Font.BOLD, 16));
            re_jLabel.setForeground(Color.blue);

            GridBagConstraints gridBagConstraints10 = new GridBagConstraints();

            gridBagConstraints10.gridx = 2;
            gridBagConstraints10.gridy = 1;
            gridBagConstraints10.fill  = GridBagConstraints.BOTH;
            test_jLabel                = new JLabel();
            test_jLabel.setText("Test stage");
            test_jLabel.setFont(new Font("Serif", Font.BOLD, 16));
            test_jLabel.setForeground(Color.blue);

            GridBagConstraints gridBagConstraints9 = new GridBagConstraints();

            gridBagConstraints9.gridx     = 2;
            gridBagConstraints9.gridwidth = 3;
            gridBagConstraints9.gridy     = 0;
            epa_jLabel                    = new JLabel();
            epa_jLabel.setText("Evolution Process");
            epa_jLabel.setForeground(Color.blue);
            epa_jLabel.setFont(new Font("Serif", Font.BOLD, 18));
            jPanelAss = new JPanel();
            jPanelAss.setSize(650, 180);
            jPanelAss.setLayout(new GridBagLayout());

            // jPanelAss.setOpaque(false);
            jPanelAss.add(epa_jLabel, gridBagConstraints9);
            jPanelAss.add(test_jLabel, gridBagConstraints10);
            jPanelAss.add(re_jLabel, gridBagConstraints11);
            jPanelAss.add(s1_jLabel, gridBagConstraints12);
            jPanelAss.add(s1o_jLabel, gridBagConstraints13);
            jPanelAss.add(s2_jLabel, gridBagConstraints14);
            jPanelAss.add(s2o_jLabel, gridBagConstraints15);
            jPanelAss.add(s3_jLabel, gridBagConstraints16);
            jPanelAss.add(s4_jLabel, gridBagConstraints17);
            jPanelAss.add(s3o_jLabel, gridBagConstraints18);
            jPanelAss.add(s4o_jLabel, gridBagConstraints19);
            jPanelAss.add(s5_jLabel, gridBagConstraints20);
            jPanelAss.add(s5o_jLabel, gridBagConstraints22);
            jPanelAss.add(r1_jLabel, gridBagConstraints23);
            jPanelAss.add(r1o_jLabel, gridBagConstraints24);
            jPanelAss.add(r2_jLabel, gridBagConstraints25);
            jPanelAss.add(r2o_jLabel, gridBagConstraints26);
            jPanelAss.add(r3_jLabel, gridBagConstraints27);
            jPanelAss.add(r3o_jLabel, gridBagConstraints28);
            jPanelAss.add(r4_jLabel, gridBagConstraints29);
            jPanelAss.add(r4o_jLabel, gridBagConstraints30);
            jPanelAss.add(r5_jLabel, gridBagConstraints31);
            jPanelAss.add(r5o_jLabel, gridBagConstraints32);
            jPanelAss.add(spec_jLabel, gridBagConstraints33);
            jPanelAss.add(config_jLabel, gridBagConstraints34);
            jPanelAss.add(ass_jLabel, gridBagConstraints35);
            jPanelAss.add(s6_jLabel, gridBagConstraints36);
            jPanelAss.add(s6o_jLabel, gridBagConstraints37);
            jPanelAss.add(r6_jLabel, gridBagConstraints38);
            jPanelAss.add(r6o_jLabel, gridBagConstraints39);
            jPanelAss.add(space1_jLabel, gridBagConstraints40);
            jPanelAss.add(space2_jLabel, gridBagConstraints41);
            jPanelAss.add(space3_jLabel, gridBagConstraints42);
            jPanelAss.add(space4_jLabel, gridBagConstraints43);
            s1_jLabel.setOpaque(true);
            s1_jLabel.setBackground(Color.white);
            s2_jLabel.setOpaque(true);
            s2_jLabel.setBackground(Color.white);
            s3_jLabel.setOpaque(true);
            s3_jLabel.setBackground(Color.lightGray);
            s4_jLabel.setOpaque(true);
            s4_jLabel.setBackground(Color.white);
            s5_jLabel.setOpaque(true);
            s5_jLabel.setBackground(Color.white);
            s6_jLabel.setOpaque(true);
            s6_jLabel.setBackground(Color.lightGray);
            r1_jLabel.setOpaque(true);
            r1_jLabel.setBackground(Color.white);
            r2_jLabel.setOpaque(true);
            r2_jLabel.setBackground(Color.lightGray);
            r3_jLabel.setOpaque(true);
            r3_jLabel.setBackground(Color.lightGray);
            r4_jLabel.setOpaque(true);
            r4_jLabel.setBackground(Color.white);
            r5_jLabel.setOpaque(true);
            r5_jLabel.setBackground(Color.white);
            r6_jLabel.setOpaque(true);
            r6_jLabel.setBackground(Color.white);
            s1o_jLabel.setOpaque(true);
            s1o_jLabel.setBackground(Color.white);
            s2o_jLabel.setOpaque(true);
            s2o_jLabel.setBackground(Color.white);
            s3o_jLabel.setOpaque(true);
            s3o_jLabel.setBackground(Color.lightGray);
            s4o_jLabel.setOpaque(true);
            s4o_jLabel.setBackground(Color.white);
            s5o_jLabel.setOpaque(true);
            s5o_jLabel.setBackground(Color.white);
            s6o_jLabel.setOpaque(true);
            s6o_jLabel.setBackground(Color.lightGray);
            r1o_jLabel.setOpaque(true);
            r1o_jLabel.setBackground(Color.white);
            r2o_jLabel.setOpaque(true);
            r2o_jLabel.setBackground(Color.lightGray);
            r3o_jLabel.setOpaque(true);
            r3o_jLabel.setBackground(Color.lightGray);
            r4o_jLabel.setOpaque(true);
            r4o_jLabel.setBackground(Color.white);
            r5o_jLabel.setOpaque(true);
            r5o_jLabel.setBackground(Color.white);
            r6o_jLabel.setOpaque(true);
            r6o_jLabel.setBackground(Color.white);
        }

        return jPanelAss;
    }

    /**
     * This method initializes begin_jButton
     *
     * @return javax.swing.JButton
     */
    private JButton getBegin_jButton() {
        if (begin_jButton == null) {
            begin_jButton = new JButton("Begiin evolution");
            begin_jButton.setText("Begin evolution");
        }

        return begin_jButton;
    }

    /**
     * This method initializes cmpOldName_jTextField
     *
     * @return javax.swing.JTextField
     */
    private JTextField getCmpOldName_jTextField() {
        if (cmpOldName_jTextField == null) {
            cmpOldName_jTextField = new JTextField();
            cmpOldName_jTextField.setVisible(false);
        }

        return cmpOldName_jTextField;
    }

    /**
     * This method initializes cmpNewName_jTextField
     *
     * @return javax.swing.JTextField
     */
    private JTextField getCmpNewName_jTextField() {
        if (cmpNewName_jTextField == null) {
            cmpNewName_jTextField = new JTextField();

            // cmpNewName_jTextField.setVisible(false);
        }

        return cmpNewName_jTextField;
    }

    /**
     * This method initializes config_jComboBox
     *
     * @return javax.swing.JComboBox
     */
    private JComboBox getConfig_jComboBox() {
        if (config_jComboBox == null) {
            config_jComboBox = new JComboBox();
            config_jComboBox.addItem("Add componentClass");
            config_jComboBox.addItem("Delete componentClass");
            config_jComboBox.addItem("Replace componentClass");
            config_jComboBox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    String evolveType = (String) config_jComboBox.getSelectedItem();

                    if (evolveType.equals("Replace componentClass")) {
                        cmpNewName_jLabel.setText("New componentClass:");
                        cmpOldName_jLabel.setVisible(true);
                        cmpOldName_jTextField.setVisible(true);
                    } else if (evolveType.equals("Add componentClass")) {
                        cmpNewName_jLabel.setText("New componentClass:");
                        cmpOldName_jLabel.setVisible(false);
                        cmpOldName_jTextField.setVisible(false);
                    } else if (evolveType.equals("Delete componentClass")) {
                        cmpNewName_jLabel.setText("Delete componentClass:");
                        cmpOldName_jLabel.setVisible(false);
                        cmpOldName_jTextField.setVisible(false);
                    }
                }
            });
        }

        return config_jComboBox;
    }

    /**
     * This method initializes ass_jComboBox
     *
     * @return javax.swing.JComboBox
     */
    private JComboBox getAss_jComboBox() {
        if (ass_jComboBox == null) {
            ass_jComboBox = new JComboBox();
            ass_jComboBox.addItem("Add componentInstance");
            ass_jComboBox.addItem("Delete componentInstance");
            ass_jComboBox.addItem("Replace componentInstance");
            ass_jComboBox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    String evolveType = (String) ass_jComboBox.getSelectedItem();

                    if (evolveType.equals("Replace componentInstance")) {
                        assNew_jLabel.setText("New componentInstance:");
                        assOld_jLabel.setVisible(true);
                        assOld_jTextField.setVisible(true);
                    } else if (evolveType.equals("Add componentInstance")) {
                        assNew_jLabel.setText("New componentInstance:");
                        assOld_jLabel.setVisible(false);
                        assOld_jTextField.setVisible(false);
                    } else if (evolveType.equals("Delete componentInstance")) {
                        assNew_jLabel.setText("Delete componentInstance:");
                        assOld_jLabel.setVisible(false);
                        assOld_jTextField.setVisible(false);
                    }
                }
            });
        }

        return ass_jComboBox;
    }

    /**
     * This method initializes spec_jComboBox
     *
     * @return javax.swing.JComboBox
     */
    private JComboBox getSpec_jComboBox() {
        if (spec_jComboBox == null) {
            spec_jComboBox = new JComboBox();
            spec_jComboBox.addItem("Add componentType");
            spec_jComboBox.addItem("Delete componentType");
            spec_jComboBox.addItem("Replace componentType");
            spec_jComboBox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    String evolveType = (String) spec_jComboBox.getSelectedItem();

                    if (evolveType.equals("Replace componentType")) {
                        specNew_jLabel.setText("New componentType:");
                        specOld_jLabel.setVisible(true);
                        specOld_jTextField.setVisible(true);
                    } else if (evolveType.equals("Add componentType")) {
                        specNew_jLabel.setText("New componentType:");
                        specOld_jLabel.setVisible(false);
                        specOld_jTextField.setVisible(false);
                    } else if (evolveType.equals("Delete componentType")) {
                        specNew_jLabel.setText("Delete componentType:");
                        specOld_jLabel.setVisible(false);
                        specOld_jTextField.setVisible(false);
                    }
                }
            });
        }

        return spec_jComboBox;
    }

    /**
     * This method initializes specNew_jTextField
     *
     * @return javax.swing.JTextField
     */
    private JTextField getSpecNew_jTextField() {
        if (specNew_jTextField == null) {
            specNew_jTextField = new JTextField();
        }

        return specNew_jTextField;
    }

    /**
     * This method initializes specOld_jTextField
     *
     * @return javax.swing.JTextField
     */
    private JTextField getSpecOld_jTextField() {
        if (specOld_jTextField == null) {
            specOld_jTextField = new JTextField();
            specOld_jTextField.setVisible(false);
        }

        return specOld_jTextField;
    }

    /**
     * This method initializes assNew_jTextField
     *
     * @return javax.swing.JTextField
     */
    private JTextField getAssNew_jTextField() {
        if (assNew_jTextField == null) {
            assNew_jTextField = new JTextField();
        }

        return assNew_jTextField;
    }

    /**
     * This method initializes assOld_jTextField
     *
     * @return javax.swing.JTextField
     */
    private JTextField getAssOld_jTextField() {
        if (assOld_jTextField == null) {
            assOld_jTextField = new JTextField();
        }

        return assOld_jTextField;
    }

    /**
     * This method initializes assEvolution_jButton
     *
     * @return javax.swing.JButton
     */
    private JButton getAssEvolution_jButton() {
        if (assEvolution_jButton == null) {
            assEvolution_jButton = new JButton("Begin evolution");
            assEvolution_jButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    String evolveType = (String) ass_jComboBox.getSelectedItem();

                    if (evolveType.equals("Replace componentInstance")) {}
                    else if (evolveType.equals("Add componentInstance")) {}
                    else if (evolveType.equals("Delete componentInstance")) {}
                }
            });
        }

        return assEvolution_jButton;
    }

    /**
     * This method initializes specEvolution_jButton
     *
     * @return javax.swing.JButton
     */
    private JButton getSpecEvolution_jButton() {
        if (specEvolution_jButton == null) {
            specEvolution_jButton = new JButton();
            specEvolution_jButton.setText("Begin evolution");
        }

        return specEvolution_jButton;
    }
}    // @jve:decl-index=0:visual-constraint="47,0"

